<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<base href="${ctxPath}">
		<meta charset="UTF-8">
		<title>登录</title>
  		<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
  		<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  		<script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
		<script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
		<style type="text/css">
			html,
			body {
			  height: 100%;
			}
			
			body {
			  display: -ms-flexbox;
			  display: -webkit-box;
			  display: flex;
			  -ms-flex-align: center;
			  -ms-flex-pack: center;
			  -webkit-box-align: center;
			  align-items: center;
			  -webkit-box-pack: center;
			  justify-content: center;
			  padding-top: 40px;
			  padding-bottom: 40px;
			  background-color: #f5f5f5;
			}
			.form-login {
				width: 330px;
				padding: 15px;
				margin: 0 auto;
			}
			.form-login .welcome{
				font-family: "黑体";
				font-weight: bold;
				text-align: center;
				margin-bottom: 30px;
			}
			
			.form-login .btn:hover{
				cursor: pointer;
			}
			.form-login .btn{
				margin-top: 20px;
				font-family: "黑体";
				letter-spacing: 7px;
			}
			.form-login .reg a{
				font-family: "楷体";
				padding-top: 10px;
				display: inline-block;
				float: right;
			}

			
		</style>
	</head>
	<body>
		<div>
			<form class="form-login" method="post" action="login">
				<h2 class="welcome">登录CRM</h2>
				<input type="text" name="username" class="form-control" placeholder="账户" autofocus="autofocus"/>
				<input type="password" name="password" class="form-control" placeholder="密码"/>
				<button class="btn btn-primary btn-lg btn-block">登录</button>
			</form>
			<c:if test="${not empty error }">
					<script type="text/javascript">alert("${error}");</script>
			</c:if>
		</div>
	</body>
</html>
